Don't use Directory.Exists to check if a path is relative#11483
Merged
davidwengier merged 7 commits intodotnet:mainfrom Feb 13, 2025
Merged
Don't use Directory.Exists to check if a path is relative#11483davidwengier merged 7 commits intodotnet:mainfrom
davidwengier merged 7 commits intodotnet:mainfrom
Conversation
Sorry, there was too much red on my screen for me to concentrate
Member
Author
|
Reddit user confirmed that moving their solution file up fixed their component discovery issues! |
ryzngard
approved these changes
Feb 13, 2025
This was referenced Feb 15, 2025
JoeRobich
added a commit
to dotnet/roslyn-tools
that referenced
this pull request
Mar 15, 2025
Noticed that we were not removing PR numbers when [fixing up the C# ext. CHANGELOG](dotnet/vscode-csharp#8071). Leaving the PR number in allows GH to turn it into a link when the number is in the range to be valid. BEFORE: * React to NuGet package pruning warnings (#11496) (PR: [#11496](dotnet/razor#11496)) * Add a couple of "stress tests" to the integration test project (#11481) (PR: [#11481](dotnet/razor#11481)) * Fix a couple of options in the old options screen (#11486) (PR: [#11486](dotnet/razor#11486)) * Don't use Directory.Exists to check if a path is relative (#11483) (PR: [#11483](dotnet/razor#11483)) * Fix another IDE0040 violation (#11474) (PR: [#11474](dotnet/razor#11474)) * Remove accessibility modifiers from interface members (#11472) (PR: [#11472](dotnet/razor#11472)) AFTER: * React to NuGet package pruning warnings (PR: [#11496](dotnet/razor#11496)) * Add a couple of "stress tests" to the integration test project (PR: [#11481](dotnet/razor#11481)) * Fix a couple of options in the old options screen (PR: [#11486](dotnet/razor#11486)) * Don't use Directory.Exists to check if a path is relative (PR: [#11483](dotnet/razor#11483)) * Fix another IDE0040 violation (PR: [#11474](dotnet/razor#11474)) * Remove accessibility modifiers from interface members (PR: [#11472](dotnet/razor#11472))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11482
Explanation, copied from the issue: RCLs don't have an absolute
BaseIntermediateOutputPath, so we end up seeing<current directory>\objas the obj path, and we have aDirectory.Existscheck that catches if that happens, and falls back to different logic for an RCL. Turns out current directory is the solution folder, and so sometimes that obj path does exist, but it exists for a different project, and then all sorts of fun shenanigans ensue.